package com.ywf.corebase.framework.enums;

/**
 * ClassName:ResultCodeEnum
 * Package:com.ywf.myproject.common.result
 * Description:
 *
 * @Date:2021/2/28 11:01
 * @Author:YWF
 */
public enum ResultCodeEnum {

    SUCCESS(20000,"成功"),
    UNKNOWN_ERROR(-20000,"未知错误"),
    PARAM_ERROR(-20001,"参数错误"),
    NULL_POINT(-20002,"空指针异常"),
    HTTP_CLIENT_ERROR(-20003,"Http状态码错误"),
    TOKEN_UN_VAILABLE(-20004,"TOKEN校验失败"),
    USER_NOT_LOGIN(-20005,"用户未登录或Token已过期"),
    USER_NOT_EXISTS(-20006,"用户未注册"),
    PARAM_NOT_COMPLETE(-20007,"参数缺失"),
    PARAM_IS_INVALID(-20008, "参数无效"),
    PARAM_IS_BLANK(-20009, "参数为空"),
    PARAM_TYPE_BIND_ERROR(-20010, "参数类型错误"),
    REQUEST_TIME_OUT(-20011, "请求超时，请重新请求"),
    TOKEN_ERROR(-20012, "token无效"),
    SIGN_ERROR(-20013, "签名错误"),
    REDIS_SERVICES_NOT_START(-20014, "Redis为获取到连接池"),
    TOKEN_PARAM_IS_EMPTY(-20015, "无token，请重新登录"),

    /*用户错误*/

    ;

    private Boolean success;

    private Integer code;

    private String msg;

    ResultCodeEnum(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
